<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddProblemIdToUserRole extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('work_order_user_role', function (Blueprint $table) {
            $table->unsignedInteger('problemPid')->default(0)->comment('父级问题类型')->after('role');
            $table->unsignedInteger('problemChildId')->default(0)->comment('子级问题类型')->after('problemPid');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('work_order_user_role', function (Blueprint $table) {
            $table->dropColumn('problemPid');
            $table->dropColumn('problemChildId');
        });
    }
}
